home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / BACKUP / FORAG100.ZIP;1 / SAFE2.BAT < prev    next >
Encoding:
DOS Batch File  |  1994-01-01  |  2.7 KB  |  82 lines

  1. @ECHO OFF
  2. ECHO OFF
  3.  
  4. REM  When this batch file is called, the following symbols are defined:
  5. REM  %1   If this contains the word FROMSAFE, we know we came from SAFE.BAT
  6. REM  %2   The name of the oldest ZIP file on the A: drive
  7. REM  %3   (Optional) The file mask for the files to be backed up
  8. REM       If no mask is given, all files are backed up
  9.  
  10. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  11. REM Make sure we came from SAFE.BAT
  12. REM
  13. IF (%1) == (FROMSAFE) GOTO EOCKSAFE
  14. ECHO This batch file is designed to be called by SAFE.BAT.  Nothing done.
  15. GOTO QUIT
  16. :EOCKSAFE
  17.  
  18. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  19. REM Get the go-ahead
  20. REM
  21. IF (%3) == () GOTO SHOWALL
  22. IF (%3) == (*.*) GOTO SHOWALL
  23. GETKEY Backup %3 to %2?  YN
  24. IF ERRORLEVEL 2 GOTO QUIT
  25. GOTO EOCKOK
  26.  
  27. :SHOWALL
  28. DIR /W
  29. GETKEY Back up this directory to %2? YN
  30. IF ERRORLEVEL 2 GOTO QUIT
  31.  
  32. :EOCKOK
  33.  
  34. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  35. REM Rename original, then make temporary directory
  36. REM
  37. MD SAFE$$$$
  38. CD SAFE$$$$
  39.  
  40. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  41. REM Make the archive
  42. REM
  43. IF     (%3) == () PKZIP -a SAFE0 ..\*.*
  44. IF NOT (%3) == () PKZIP -a SAFE0 ..\%3
  45.  
  46. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  47. REM PKZIP doesn't return set ERRORLEVEL (last time we checked) but in case
  48. REM it ever does, let's check it.
  49. REM
  50. IF ERRORLEVEL 1 GOTO PROBLEM
  51.  
  52. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  53. REM Copy the file to the diskette, then clean up
  54. REM
  55. COPY SAFE0.ZIP %2
  56. CD ..
  57. ECHO Y | DEL SAFE$$$$\*.*
  58. RD SAFE$$$$
  59. CLS
  60. ECHO ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹€flflflflflflflflflflflflflflflflflflflflflflfl€‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
  61. ECHO €±∞±∞±∞±∞±∞±∞±∞±∞±∞±∞±∞±∞±€    BACKUP  COMPLETE!    €±∞±∞±∞±∞±∞±∞±∞±∞±∞±∞±∞±∞±€
  62. ECHO flflflflflflflflflflflflflflflflflflflflflflflflflflfl€‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹€flflflflflflflflflflflflflflflflflflflflflflflflflflfl
  63. PINNACLE X
  64. GOTO QUIT
  65.  
  66. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  67. REM Trouble
  68. REM
  69. :PROBLEM
  70. CLS
  71. ECHO €flflflflflflflflflflflflflflflflflflfl  SAFE -- THE QUICK BACKUP UTILITY  flflflflflflflflflflflflflflflflflfl€
  72. ECHO ›                                                                         fi
  73. ECHO ›              An error has occured.  The temporary directory             fi
  74. ECHO ›              SAFE$$$$ may contain some extraneous files.                fi
  75. ECHO ›                                                                         fi                                 fi
  76. ECHO €‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹€
  77.  
  78. REM ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  79. REM The End
  80. REM
  81. :QUIT
  82.